﻿using B.T.BasicData.Read.Api.Common.ICommon;

namespace B.T.BasicData.Read.Api.Common
{
    /// <summary>
    /// 获取指定信息封装方法
    /// </summary>
    public class IdentivyService: IIdentivyService
    {
        private readonly ILogger<IdentivyService> logger;
        private readonly IHttpContextAccessor httpContextAccessor;

        public IdentivyService(ILogger<IdentivyService> logger, IHttpContextAccessor httpContextAccessor)
        {
            this.logger = logger;
            this.httpContextAccessor = httpContextAccessor;

            this.UserId = httpContextAccessor.HttpContext.User.FindFirst("UserId")?.Value;
            this.NickName = httpContextAccessor.HttpContext.User.FindFirst("NickName")?.Value;
        }


        public string UserId { get; set; }

        public string NickName { get; set; }


    }
}
